#ifndef __H_SPI_S_H__
#define __H_SPI_S_H__

typedef struct
{
    void (*sck_out_init)(void);
    void (*sck_high)(void);
    void (*sck_low)(void);
    void (*cs_out_init)(void);
    void (*cs_high)(void);
    void (*cs_low)(void);
    void (*mosi_out_init)(void);
    void (*mosi_high)(void);
    void (*mosi_low)(void);
    void (*miso_in_init)(void);
    signed char (*miso_read)(void);
    void (*delay_us)(unsigned int);
}h_spi_s_t;

extern void h_spi_s_init(h_spi_s_t *spi);
extern void h_spi_s_read_buffer(h_spi_s_t *spi, unsigned char *data, unsigned short len);
extern void h_spi_s_write_buffer(h_spi_s_t *spi, unsigned char *data, unsigned short len);

#endif
